/**
 * 为用户配置部门权限，拥有该权限后，该用户将作为该部门的管理员
 */
var zTree_dept;
var setting_dept;
setting_dept = {
	isSimpleData: true,
	treeNodeKey: "id",
	treeNodeParentKey: "parent_id",
	nameCol : "name",
	checkable:true,
	fontCss: {color: "blue"}
};

function reloadDeptTree(user_code) {
	$.ajax({
		url: '../department/listDepartmentAsScopeAll.action',   
		type:'POST',
		data:{'user_code':user_code},
		dataType: 'json',
		beforeSend:function(xmlhttprequest){
		},
		success:function(data){
			zTree_dept = $("#dropdownDepartment").zTree(setting_dept, clone(data));
		},
		error:function(action, errortype, desc){
			alert("加载部门信息失败，请检查网络连接或稍后再试！");
		}
	});
}